Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / core / repository / src / commonMain / kotlin / org / meshtastic / core / repository / ClientNotificationIdentity.kt

Displaying Raw • Download

core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/ClientNotificationIdentity.kt 65a1f5ce4d0e4b8eafcd0bbfccafd41dc6ee888a (65a1f5ce) Text, 1.93 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository

Tff7b72import T7ee787org.meshtastic.proto.ClientNotification

T8b949e/**
* Stable platform-notification identity shared by posting and cancellation paths.
*
* Deliberately excludes `reply_id` and `time`: both change on every firmware reply, so hashing the full notification
* (e.g. via `toString()`) mints a fresh id per occurrence and defeats coalescing — a repeated advisory would stack up
* as a new tray entry every time instead of updating the same one.
*
* Hashes only strings and the enum's wire value, never the enum object: enum hashCodes are identity-based, and the tray
* outlives the process — a repost after a service restart must land on the same id.
*/
Tff7b72fun Te6edf3ClientNotificationTb4b4b4.Td2a8ffnotificationIdTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Int Tff7b72= Te6edf3listOfTb4b4b4(Te6edf3messageTb4b4b4, Te6edf3levelTb4b4b4.Te6edf3valueTb4b4b4, Te6edf3payloadVariantKeyTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4.Te6edf3hashCodeTb4b4b4(Tb4b4b4)

Tff7b72private Tff7b72fun Te6edf3ClientNotificationTb4b4b4.Td2a8ffpayloadVariantKeyTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657String Tff7b72= Tff7b72when Tb4b4b4{
Te6edf3key_verification_number_inform Tff7b72!Tff7b72= Tff7b72null Tff7b72-Tff7b72> Ta5d6ff"Ta5d6ffkey_verification_number_informTa5d6ff"
Te6edf3key_verification_number_request Tff7b72!Tff7b72= Tff7b72null Tff7b72-Tff7b72> Ta5d6ff"Ta5d6ffkey_verification_number_requestTa5d6ff"
Te6edf3key_verification_final Tff7b72!Tff7b72= Tff7b72null Tff7b72-Tff7b72> Ta5d6ff"Ta5d6ffkey_verification_finalTa5d6ff"
Te6edf3duplicated_public_key Tff7b72!Tff7b72= Tff7b72null Tff7b72-Tff7b72> Ta5d6ff"Ta5d6ffduplicated_public_keyTa5d6ff"
Te6edf3low_entropy_key Tff7b72!Tff7b72= Tff7b72null Tff7b72-Tff7b72> Ta5d6ff"Ta5d6fflow_entropy_keyTa5d6ff"
Tff7b72else Tff7b72-Tff7b72> Ta5d6ff"Ta5d6ffgenericTa5d6ff"
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s